<!DOCTYPE html>
<html lang="utf-8">
<head>
    <meta charset="UTF-8">
    <#include "/comm/module-index.ftl"/>
</head>
<body>
<div class="layui-div-body">
    <div class="layui-fluid  layui-div-table">
        <div>
            <div class="common-btn-block">
                <button class="layui-btn layui-btn-sm" lay-on="add"><i
                            class="layui-icon  layui-icon-add-1"></i> 添加
                </button>
            </div>
        </div>
        <#-- table-->
        <div class="layui-table-body" style="flex: 1" id="layui-table-bar">
            <table class="layui-hide" lay-filter="layui-table-main" id="layui-table-main"></table>
        </div>
    </div>
</div>
<script type="text/html" id="editOpenBtn">
    {{#  if(d.editOpen==1){ }}
    开启
    {{#  } else { }}
    关闭
    {{#  } }}
</script>
<script type="text/javascript">
    layui.use(['index'], function () {
        let tableBase = layui.index;
        tableBase.render({
            cols: [{type: 'space', hide: true, field: "_id"},
                {type: 'numbers', title: "序号", fixed: 'left'},
                {field: 'name', title: '部门名称'},
                {field: 'editOpen', title: '编辑权限', toolbar: '#editOpenBtn', width: 100},
                {field: 'remark', title: '描述'},
                {title: '状态', width: 60, field: '_status', toolbar: '#statusBtn', align: 'center'},
                {fixed: 'right', title: '操作', toolbar: '#operateBtn', width: 130, align: 'center'}

            ],
            area: ['800px', '400px'],
            tree: {
                view: {
                    expandAllDefault: true
                }
            }
        })

    });

</script>
</body>
</html>
